export default {
  namespaced: true,
  state: {
    _cname: '测试模块2',
    value: 'testMolle'
  },
  mutations: {
    setKeyValue: function (state, { key, value }) {
      console.log(key, value)
      state[key] = value
    },
  },//调用时要用this.$store.commit('molle/setKeyValue',{key,value})
  getters: {
    getValue: function (state) {
      return function (arg) {
        return {
          value: state.value,
          arg: arg,
        }
      };
    }
  },//调用时要用this.$store.getters['molle/getValue']
  actions: {
    ajaxKeyValue: function (state, { key, value }) {
      console.log()
      return Promise.resolve(200)
    }
  },
}